/* 基本样式 */


.image-container {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.transparent-button {
    background-color: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    color: white; /* 按钮文字颜色 */
    border: none;
    cursor: pointer;
    padding: 10px 10px;
    font-size: 16px;
    white-space: nowrap; /* 防止按钮换行 */
    text-decoration: none; /* 移除默认下划线 */
    display: inline-block;
    transition: background-color 0.3s ease; /* 平滑过渡效果 */
    box-sizing: border-box; /* 包含padding和border */
}

/* 图片容器的宽度和高度需要固定，以便计算按钮位置 */
.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* 底部居中的按钮容器 */
.button-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: flex-end;
    width: 100%; /* 使按钮容器通栏 */
    background: transparent; /* 使背景透明 */
    padding: 0 10px; /* 可选的内边距 */
    overflow-x: auto; /* 允许水平滚动 */
    white-space: nowrap; /* 防止按钮换行 */
    scrollbar-width: none; /* 隐藏滚动条（Firefox） */
    -ms-overflow-style: none; /* 隐藏滚动条（IE/Edge） */
}

/* 隐藏滚动条（Webkit 浏览器） */
.button-container::-webkit-scrollbar {
    display: none;
}

/* 按钮之间的间距 */
.button-container > .transparent-button {
    margin: 0 2px; /* 左右各2像素，总共4像素间距 */
}

/* 鼠标悬停效果 */
.transparent-button:hover {
    background-color: rgba(0, 0, 0, 0.8); /* 更深的半透明背景 */
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .transparent-button {
        font-size: 14px;
        padding: 4px 4px;
         word-break: break-word; /* 允许在单词内的任意位置断行 */
        overflow-wrap: break-word; /* 和 word-break 类似，但更兼容老版本浏览器 */
        white-space: pre-line; /* 保留换行符和缩进，其他空白符会被忽略，并且允许断行 */
    }
}